/**
 * 
 */
package com.reserveme;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Index;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Resource {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private String ground;

	@Index
    @Persistent
    private String date;
    
    public Resource(String ground, Date date) {
    	this.ground = ground;
    	this.date = date.toString();
    }
    
    /** 
     * Our accesors
     */
    
    public String getGround() {
    	return this.ground;
    }
    
    public String getDate() {
    	return this.date;
    }
    
    public void setGround(String ground) {
    	this.ground = ground;
    }
    
    public void setDate(Date date) {
    	this.date = date.toString();
    }
}
